﻿<script src="../../Scripts/jquery-1.5.1.min.js" type="text/javascript"></script>
<script type="text/javascript" src="../../Scripts/jquery-ui-1.8.11.min.js"></script>
<link href="../../Content/themes/base/jquery.ui.all.css" rel="stylesheet" type="text/css" />

<script type="text/javascript">
    $(function () {
        $("#StartDate").datepicker();
        $("#EndDate").datepicker();
        $("#StartDateVacation").datepicker();
        $("#EndDateVacation").datepicker();
    });
</script>

@{
    ViewBag.Title = "Create Assignment";
    Layout = "~/Views/Shared/_Layout.cshtml";
}

@model vITs.Site.Models.ActionModels.CreateAssignmentModel
@using (this.Html.BeginForm())       
{
    <fieldset>
    <legend><h2>Create Assignment</h2></legend>
    
    <span style="color:#00FF00;">@ViewBag.CreatedAssignment</span>
    @this.Html.ValidationSummary(false)
    

    @this.Html.LabelFor(model => model.Name)
    <br />
    @this.Html.TextBoxFor(model => model.Name)
    @this.Html.ValidationMessageFor(model => model.Name)

    <br />
    @this.Html.LabelFor(model => model.Handler)
    <br />
    <select name="Handler" >
    @foreach (var manager in ViewBag.ListofManagers)
    {
        <option value="@manager.UserId">@manager.GivenName @manager.Surname</option>
    }
    </select>
    @this.Html.ValidationMessageFor(model => model.Handler)
    <br />
    @this.Html.LabelFor(model => model.StartDate)
    <br />
    @this.Html.EditorFor(model => model.StartDate)
    @this.Html.ValidationMessageFor(model => model.StartDate)
    <br />
    @this.Html.LabelFor(model => model.EndDate)
    <br />
    @this.Html.EditorFor(model => model.EndDate)
    @this.Html.ValidationMessageFor(model => model.EndDate)
    <br />
    <input type="submit" value="Spara" />

    </fieldset>
}